package cn.com.nes.mybatis.agent.ope.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * <p>
 * 数据项明细字段表
 * </p>
 *
 * @author nes
 * @since 2023-02-28
 */
@TableName("is_data_item_field")
public class IsDataItemField extends Model<IsDataItemField> {

    private static final long serialVersionUID = 1L;

    /**
     * 自增id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 数据项字段id
     */
    @TableField("data_item_field_id")
    private String dataItemFieldId;
    /**
     * 设备协议id
     */
    @TableField("device_protocol_id")
    private String deviceProtocolId;
    /**
     * 厂商id
     */
    @TableField("manufacture_id")
    private String manufactureId;
    /**
     * 查询指令id
     */
    @TableField("protocol_query_command_id")
    private String protocolQueryCommandId;
    /**
     * 数据项id
     */
    @TableField("data_item_id")
    private String dataItemId;
    /**
     * 字段索引
     */
    @TableField("`index`")
    private Integer index;
    /**
     * 标题
     */
    private String name;
    /**
     * 数据项值
     */
    private String value;
    /**
     * 标准化值表id
     */
    @TableField("norm_value_id")
    private String normValueId;
    /**
     * 逻辑删除  1 表示删除，0 表示未删除
     */
    @TableField("is_deleted")
    private Integer isDeleted;
    /**
     * 创建人
     */
    @TableField("cr_oper")
    private String crOper;
    /**
     * 创建时间
     */
    @TableField("gmt_create")
    private Date gmtCreate;
    /**
     * 修改人
     */
    @TableField("up_oper")
    private String upOper;
    /**
     * 修改时间
     */
    @TableField("gmt_modified")
    private Date gmtModified;
    /**
     * 数据版本号  当前时间戳
     */
    private Long version;
    /**
     * 数据来源
     */
    private String sjly;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDataItemFieldId() {
        return dataItemFieldId;
    }

    public void setDataItemFieldId(String dataItemFieldId) {
        this.dataItemFieldId = dataItemFieldId;
    }

    public String getDeviceProtocolId() {
        return deviceProtocolId;
    }

    public void setDeviceProtocolId(String deviceProtocolId) {
        this.deviceProtocolId = deviceProtocolId;
    }

    public String getManufactureId() {
        return manufactureId;
    }

    public void setManufactureId(String manufactureId) {
        this.manufactureId = manufactureId;
    }

    public String getProtocolQueryCommandId() {
        return protocolQueryCommandId;
    }

    public void setProtocolQueryCommandId(String protocolQueryCommandId) {
        this.protocolQueryCommandId = protocolQueryCommandId;
    }

    public String getDataItemId() {
        return dataItemId;
    }

    public void setDataItemId(String dataItemId) {
        this.dataItemId = dataItemId;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getNormValueId() {
        return normValueId;
    }

    public void setNormValueId(String normValueId) {
        this.normValueId = normValueId;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public String getCrOper() {
        return crOper;
    }

    public void setCrOper(String crOper) {
        this.crOper = crOper;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public String getUpOper() {
        return upOper;
    }

    public void setUpOper(String upOper) {
        this.upOper = upOper;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    public Long getVersion() {
        return version;
    }

    public void setVersion(Long version) {
        this.version = version;
    }

    public String getSjly() {
        return sjly;
    }

    public void setSjly(String sjly) {
        this.sjly = sjly;
    }

    public static final String ID = "id";

    public static final String DATA_ITEM_FIELD_ID = "data_item_field_id";

    public static final String DEVICE_PROTOCOL_ID = "device_protocol_id";

    public static final String MANUFACTURE_ID = "manufacture_id";

    public static final String PROTOCOL_QUERY_COMMAND_ID = "protocol_query_command_id";

    public static final String DATA_ITEM_ID = "data_item_id";

    public static final String INDEX = "index";

    public static final String NAME = "name";

    public static final String VALUE = "value";

    public static final String NORM_VALUE_ID = "norm_value_id";

    public static final String IS_DELETED = "is_deleted";

    public static final String CR_OPER = "cr_oper";

    public static final String GMT_CREATE = "gmt_create";

    public static final String UP_OPER = "up_oper";

    public static final String GMT_MODIFIED = "gmt_modified";

    public static final String VERSION = "version";

    public static final String SJLY = "sjly";

    @Override
    public Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "IsDataItemField{" +
        ", id=" + id +
        ", dataItemFieldId=" + dataItemFieldId +
        ", deviceProtocolId=" + deviceProtocolId +
        ", manufactureId=" + manufactureId +
        ", protocolQueryCommandId=" + protocolQueryCommandId +
        ", dataItemId=" + dataItemId +
        ", index=" + index +
        ", name=" + name +
        ", value=" + value +
        ", normValueId=" + normValueId +
        ", isDeleted=" + isDeleted +
        ", crOper=" + crOper +
        ", gmtCreate=" + gmtCreate +
        ", upOper=" + upOper +
        ", gmtModified=" + gmtModified +
        ", version=" + version +
        ", sjly=" + sjly +
        "}";
    }

    @Override
    public int hashCode() {
        return Objects.hash(dataItemFieldId);
    }
}
